<template>
	<view class="feedback-list">
		<!-- 意见列表展示 -->
		<view class="feedback-item" v-for="(optionList, index) in optionList" :key="index">
			<view class="feedback-left">
				<text>反馈标题：{{ optionList.title }}</text>
				<text>反馈内容：{{ optionList.content }}</text>
				<text>平台回复：{{ optionList.reply }}</text>

			</view>
		</view>

		<!-- 反馈意见按钮 -->
		<navigator class="feedback-button" url="/pages/my/Feedback/FeedbackDetails/FeedbackDetails">
			反馈意见
		</navigator>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				pageNo: 1, // 页码
				optionList: [], // 反馈列表数据
				totalPageCount: 0, // 总页数
				isLoading: false // 加载标志
			};
		},
		onLoad(e) {
			console.log(e)
			uni.request({
				url: 'http://localhost:9205/opinion/list',
				method: 'GET',
				header: {
					'authorization': 'eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6ImI0OWU4NmFkLTZhNTMtNGQyNS1iNzFkLTQ1NjBiOTE2ZTFhNSIsInVzZXJuYW1lIjoiYWRtaW4ifQ.PHw5Ez00yg0Vk_Wx4zO3rnSUHe2znWiWOK2IhwFS80dqK02znBtDbe7GfAiuT3YOQSsnBdIi0O7fjprpExMxlg'
				},
				success: (res) => {
					// console.log(res)
					this.optionList = res.data.rows

					console.log(this.optionList)
				}
			})
		},
		methods: {

		}
	};
</script>

<style scoped>
	.feedback-list {
		padding: 20px;
		background-color: #f9f9f9;
	}

	.feedback-item {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 15px;
		margin-bottom: 10px;
		background-color: #fff;
		border-radius: 8px;
		box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
	}

	.feedback-left {
		display: flex;
		flex-direction: column;
	}

	.feedback-left h3 {
		margin: 0;
		font-size: 16px;
		color: #333;
	}

	.feedback-left p {
		margin: 5px 0;
		font-size: 14px;
		color: #666;
	}

	.feedback-left span {
		font-size: 12px;
		color: #999;
	}

	.feedback-button {
		margin-top: 20px;
		width: 630rpx;
		padding: 12px;
		background: linear-gradient(135deg, #42a5f5, #1e88e5);
		border: none;
		color: white;
		font-size: 18px;
		font-weight: bold;
		cursor: pointer;
		border-radius: 30px;
		box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
		text-align: center;
		transition: background 0.3s, box-shadow 0.3s;
	}

	.feedback-button:hover {
		background: linear-gradient(135deg, #1e88e5, #1976d2);
		box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
	}

	.feedback-button:active {
		background: linear-gradient(135deg, #1976d2, #1565c0);
		box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
	}
</style>